Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ahooksjs/use-request

Package Overview
Dependencies
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ahooksjs/use-request

React Hooks for fetching, caching and updating asynchronous data

  • 2.8.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30K
decreased by-6.69%
Maintainers
5
Weekly downloads
 
Created
Source

useRequest

Production-ready React Hook to manage asynchronous data.

Core Characteristics

  • Auto-triggered request and Manually-triggered Request
  • SWR(stale-while-revalidate)
  • Cache / Preload
  • Refresh On Window Focus
  • Polling
  • Debounce
  • Throttle
  • Concurrent Request
  • Dependent Request
  • Loading Delay
  • Pagination
  • Load more, data recovery and scroll position recovery
  • ......

Installing

Inside your React project directory, run the following:

yarn add @ahooksjs/use-request

yarn add @ahooksjs/use-request

Or with npm:

npm install @ahooksjs/use-request

Example

import useRequest from '@ahooksjs/use-request';

const { data, error, loading, run } = useRequest('/api/user');

Documentation

https://ahooks.js.org/hooks/async

FAQs

Package last updated on 07 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc